.class public Lcom/xingbook/xingbook/activity/XingBookDetailActivity;
.super Lcom/xingbook/park/activity/BaseActivity;

# interfaces
.implements Lcom/xingbook/service/download/f;


# instance fields
.field a:Z

.field private b:Lcom/xingbook/xingbook/b/d;

.field private c:Landroid/app/ProgressDialog;

.field private d:Lcom/xingbook/xingbook/d/d;

.field private e:Ljava/lang/String;

.field private f:Lcom/xingbook/xingbook/d/g;

.field private g:Lcom/xingbook/xingbook/c/d;

.field private h:Lcom/xingbook/xingbook/activity/k;


# direct methods
.method public constructor <init>()V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0}, Lcom/xingbook/park/activity/BaseActivity;-><init>()V

    iput-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->b:Lcom/xingbook/xingbook/b/d;

    iput-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->a:Z

    new-instance v0, Lcom/xingbook/xingbook/activity/h;

    invoke-direct {v0, p0}, Lcom/xingbook/xingbook/activity/h;-><init>(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;)V

    iput-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->f:Lcom/xingbook/xingbook/d/g;

    new-instance v0, Lcom/xingbook/xingbook/activity/i;

    invoke-direct {v0, p0}, Lcom/xingbook/xingbook/activity/i;-><init>(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;)V

    iput-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->g:Lcom/xingbook/xingbook/c/d;

    new-instance v0, Lcom/xingbook/xingbook/activity/k;

    invoke-direct {v0, p0}, Lcom/xingbook/xingbook/activity/k;-><init>(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;)V

    iput-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->h:Lcom/xingbook/xingbook/activity/k;

    return-void
.end method

.method static synthetic a(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;)Lcom/xingbook/xingbook/c/d;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->g:Lcom/xingbook/xingbook/c/d;

    return-object v0
.end method

.method private a()V
    .locals 1

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->isShowing()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V

    :cond_0
    return-void
.end method

.method private a(I)V
    .locals 2

    iget-boolean v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->a:Z

    if-eqz v0, :cond_0

    :goto_0
    return-void

    :cond_0
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->a:Z

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->h:Lcom/xingbook/xingbook/activity/k;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/xingbook/xingbook/activity/k;->sendEmptyMessage(I)Z

    sget-object v0, Lcom/xingbook/c/o;->h:Ljava/util/concurrent/ExecutorService;

    new-instance v1, Lcom/xingbook/xingbook/activity/j;

    invoke-direct {v1, p0, p1}, Lcom/xingbook/xingbook/activity/j;-><init>(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;I)V

    invoke-interface {v0, v1}, Ljava/util/concurrent/ExecutorService;->execute(Ljava/lang/Runnable;)V

    goto :goto_0
.end method

.method public static a(Landroid/content/Context;Ljava/lang/String;Z)V
    .locals 2

    if-eqz p2, :cond_0

    invoke-static {p0}, Lcom/xingbook/c/n;->a(Landroid/content/Context;)Lcom/xingbook/c/n;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/c/n;->g()Lcom/xingbook/park/d/e;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/xingbook/park/d/e;->c(Ljava/lang/String;)I

    move-result v0

    invoke-static {v0}, Lcom/xingbook/xingbook/b/a;->b(I)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Lcom/xingbook/park/activity/OpenBookAct;->a(Landroid/content/Context;Ljava/lang/String;Z)V

    :goto_0
    return-void

    :cond_0
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "com.xingbook.park.activity.TellStoryDetailActivity.INTENT_STORYID"

    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    instance-of v1, p0, Landroid/app/Activity;

    if-nez v1, :cond_1

    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    :cond_1
    invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto :goto_0
.end method

.method static synthetic a(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;I)V
    .locals 0

    invoke-direct {p0, p1}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->a(I)V

    return-void
.end method

.method static synthetic a(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;Lcom/xingbook/xingbook/b/d;)V
    .locals 0

    iput-object p1, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->b:Lcom/xingbook/xingbook/b/d;

    return-void
.end method

.method static synthetic a(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;Ljava/lang/String;Z)V
    .locals 0

    invoke-direct {p0, p1, p2}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->a(Ljava/lang/String;Z)V

    return-void
.end method

.method private a(Ljava/lang/String;Z)V
    .locals 2

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    if-nez v0, :cond_0

    new-instance v0, Landroid/app/ProgressDialog;

    invoke-direct {v0, p0}, Landroid/app/ProgressDialog;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    :cond_0
    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0, p1}, Landroid/app/ProgressDialog;->setMessage(Ljava/lang/CharSequence;)V

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0, p2}, Landroid/app/ProgressDialog;->setIndeterminate(Z)V

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/app/ProgressDialog;->setCancelable(Z)V

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->isShowing()Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->c:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->show()V

    :cond_1
    return-void
.end method

.method static synthetic b(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;)V
    .locals 0

    invoke-direct {p0}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->a()V

    return-void
.end method

.method static synthetic c(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;)Lcom/xingbook/xingbook/d/d;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->d:Lcom/xingbook/xingbook/d/d;

    return-object v0
.end method

.method static synthetic d(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;)Lcom/xingbook/xingbook/b/d;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->b:Lcom/xingbook/xingbook/b/d;

    return-object v0
.end method

.method static synthetic e(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;)Ljava/lang/String;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->e:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic f(Lcom/xingbook/xingbook/activity/XingBookDetailActivity;)Lcom/xingbook/xingbook/activity/k;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->h:Lcom/xingbook/xingbook/activity/k;

    return-object v0
.end method


# virtual methods
.method public a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V
    .locals 1

    invoke-static {p0}, Lcom/xingbook/c/n;->a(Landroid/content/Context;)Lcom/xingbook/c/n;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/c/n;->j()Lcom/xingbook/service/download/b;

    move-result-object v0

    invoke-virtual {v0, p1, p2, p3, p4}, Lcom/xingbook/service/download/b;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V

    return-void
.end method

.method public e()Ljava/lang/String;
    .locals 2

    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "\u661f\u5b9d\u4e66-\u8be6\u60c5"

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 3

    const/4 v2, 0x0

    invoke-virtual {p0}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    if-eqz v0, :cond_1

    const-string v1, "com.xingbook.park.activity.TellStoryDetailActivity.INTENT_STORYINFO"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    :try_start_0
    const-string v1, "com.xingbook.park.activity.TellStoryDetailActivity.INTENT_STORYINFO"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getSerializable(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Lcom/xingbook/xingbook/b/d;

    iput-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->b:Lcom/xingbook/xingbook/b/d;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    new-instance v0, Lcom/xingbook/xingbook/d/d;

    invoke-static {p0}, Lcom/xingbook/c/n;->b(Landroid/app/Activity;)F

    move-result v1

    iget-object v2, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->f:Lcom/xingbook/xingbook/d/g;

    invoke-direct {v0, p0, v1, v2}, Lcom/xingbook/xingbook/d/d;-><init>(Landroid/app/Activity;FLcom/xingbook/xingbook/d/g;)V

    iput-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->d:Lcom/xingbook/xingbook/d/d;

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->d:Lcom/xingbook/xingbook/d/d;

    invoke-virtual {p0, v0}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->setContentView(Landroid/view/View;)V

    invoke-super {p0, p1}, Lcom/xingbook/park/activity/BaseActivity;->onCreate(Landroid/os/Bundle;)V

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->b:Lcom/xingbook/xingbook/b/d;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->d:Lcom/xingbook/xingbook/d/d;

    iget-object v1, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->b:Lcom/xingbook/xingbook/b/d;

    invoke-virtual {v0, v1}, Lcom/xingbook/xingbook/d/d;->setTellStory(Lcom/xingbook/xingbook/b/d;)V

    :goto_1
    invoke-static {p0}, Lcom/xingbook/c/n;->a(Landroid/content/Context;)Lcom/xingbook/c/n;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/c/n;->j()Lcom/xingbook/service/download/b;

    move-result-object v0

    iget-object v1, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->d:Lcom/xingbook/xingbook/d/d;

    invoke-virtual {v0, v1}, Lcom/xingbook/service/download/b;->a(Lcom/xingbook/service/download/m;)V

    :goto_2
    return-void

    :catch_0
    move-exception v0

    iput-object v2, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->b:Lcom/xingbook/xingbook/b/d;

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0

    :cond_1
    if-eqz v0, :cond_0

    const-string v1, "com.xingbook.park.activity.TellStoryDetailActivity.INTENT_STORYID"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->containsKey(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    :try_start_1
    const-string v1, "com.xingbook.park.activity.TellStoryDetailActivity.INTENT_STORYID"

    invoke-virtual {v0, v1}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->e:Ljava/lang/String;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_0

    :catch_1
    move-exception v0

    iput-object v2, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->e:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->e:Ljava/lang/String;

    if-eqz v0, :cond_3

    const-string v0, ""

    iget-object v1, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->e:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_3

    const/16 v0, 0x96

    invoke-direct {p0, v0}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->a(I)V

    goto :goto_1

    :cond_3
    const-string v0, "\u6570\u636e\u4fe1\u606f\u9519\u8bef\uff0c\u8bf7\u9000\u51fa\u5f53\u524d\u9875\u9762\u91cd\u8bd5\uff01"

    const/4 v1, 0x0

    invoke-static {p0, v0, v1}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    invoke-virtual {p0}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->finish()V

    goto :goto_2
.end method

.method protected onDestroy()V
    .locals 2

    invoke-direct {p0}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->a()V

    invoke-static {p0}, Lcom/xingbook/c/n;->a(Landroid/content/Context;)Lcom/xingbook/c/n;

    move-result-object v0

    invoke-virtual {v0}, Lcom/xingbook/c/n;->j()Lcom/xingbook/service/download/b;

    move-result-object v0

    iget-object v1, p0, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->d:Lcom/xingbook/xingbook/d/d;

    invoke-virtual {v0, v1}, Lcom/xingbook/service/download/b;->b(Lcom/xingbook/service/download/m;)V

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onDestroy()V

    return-void
.end method

.method protected onPause()V
    .locals 1

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onPause()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onPause(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->b(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 1

    invoke-super {p0}, Lcom/xingbook/park/activity/BaseActivity;->onResume()V

    invoke-static {p0}, Lcom/baidu/mobstat/StatService;->onResume(Landroid/content/Context;)V

    invoke-virtual {p0}, Lcom/xingbook/xingbook/activity/XingBookDetailActivity;->j()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/a/a/g;->a(Ljava/lang/String;)V

    invoke-static {p0}, Lcom/a/a/g;->b(Landroid/content/Context;)V

    return-void
.end method
